package com.rubiksillusions;

public class Solver {
	private RubiksCube rubiksCube;
	private Algorithm algorithm;
	private String movesList;
	
	public Solver(RubiksCube rubiksCube, Algorithm algorithm) {
		this.rubiksCube = rubiksCube;
		this.algorithm = algorithm;
		execute();
	}
	
	public void changeAlgorithm(Algorithm algorithm) {
		this.algorithm = algorithm;
	}
	
	private void execute() {
		movesList = algorithm.execute(rubiksCube);
	}
	
	public String getMovesList() {
		return movesList;
	}
}
